/* 
 * File:   main.cpp
 * Author: mrossetti
 *
 * Created on 22 giugno 2011, 15.46
 */

#include <cstdlib>
#include "main.h"

using namespace std;

/*
 * 
 */

int main(int argc, char** argv) {
    Main SDL_Base;
    return SDL_Base.OnExecute();
}

Main::Main(){
    Surf_Display = NULL;
    Surf_test = NULL;
    
    Running = true;
}

int Main::OnExecute(){
    if(OnInit() == false){
        return -1;
    }

    SDL_Event Event;

    while(Running){
        while(SDL_PollEvent(&Event)){
            OnEvent(&Event);
        }
        OnLoop();
        OnRender();
    }
    OnCleanup();
    return 0;
}
